//
//  ViewController.swift
//  表情键盘
//
//  Created by lujun on 2021/11/24.
//

import UIKit

class ViewController: UIViewController {
    private lazy var emoticonVc: EmoticonController = EmoticonController {[weak self] (emoticon) -> () in
        self?.textView1.insertEmoticon(emoticon: emoticon)
    }
    @IBOutlet weak var textView1: UITextView!
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "表情键盘"
        textView1.inputView = emoticonVc.view
        debugPrint(NSHomeDirectory())
     }
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
        textView1.becomeFirstResponder()
    }
    @IBAction func sendClick(_ sender: Any) {
        
        debugPrint(textView1.getEmoticonString())
    }
}

